home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / voyages.g < prev    next >
Text File  |  1995-05-04  |  6KB  |  260 lines

  1. (game-module "voyages"
  2.   (title "Voyages of Discovery")
  3.   (blurb "Sail across uncharted seas, find new lands")
  4.   (variants
  5.    (see-all false)
  6.    (world-seen false)
  7.    (world-size (80 40))
  8.    ("Wind" wind
  9.      (true
  10.        (add fleet speed-wind-effect 12345) ; real list calc not impled yet
  11.        (add t* wind-force-min 0)
  12.        (add t* wind-force-average 1)
  13.        (add t* wind-force-max 3)
  14.        (add land wind-variability 30)
  15.        (add waters wind-variability 10)
  16.        (set wind-mix-range 1)
  17.        ))
  18.    )
  19. )
  20.  
  21. ;; should be a self-unit (?) with 2-3 hex radius of control
  22.  
  23. (unit-type explorer (image-name "conquistador")
  24.   (help "our hero, plus bodyguards and personal servants")
  25.   (acp-per-turn 2)
  26.   (hp-max 3)
  27.   )
  28.  
  29. (unit-type crew (image-name "soldiers")
  30.   (help "supports the explorer")
  31.   (acp-per-turn 1)
  32.   (hp-max 30) (parts-max 30) 
  33.   )
  34.  
  35. (unit-type fleet (image-name "caravel-fleet")
  36.   (help "transportation across the sea")
  37.   (acp-per-turn 14)
  38.   (hp-max 30) (parts-max 3)
  39.   )
  40.  
  41. ;;; What the crew can build to live in.  This is not a port however, ships must
  42. ;;; remain at sea.
  43.  
  44. (unit-type fort (image-name "walltown")
  45.   (help "can be built for protection"))
  46.  
  47. (unit-type city (image-name "city18")
  48.   (help "home port, with nearly limitless supply"))
  49.  
  50. (unit-type native-village (image-name "village")
  51.   (help "where the more primitive natives live"))
  52.  
  53. (unit-type native-city (image-name "city18")
  54.   (help "where the civilized natives live"))
  55.  
  56. (define native-places (native-village native-city))
  57.  
  58. (define places (fort city native-village native-city))
  59.  
  60. ;; the essentials
  61. (material-type food)
  62. (material-type water)
  63. (material-type wood
  64.   (help "to build and repair ships"))
  65. ;; the goals
  66. (material-type gold)
  67. (material-type gems)
  68. (material-type spices)
  69.  
  70. ;;; The usual collection of terrain types.
  71. ;;; (perhaps should flush in favor of smaller set? - no roads needed for instance)
  72.  
  73. (include "stdterr")
  74.  
  75. (define land (swamp desert plains forest mountains ice))
  76. (define waters (sea shallows))
  77.  
  78. ;;; Static relationships.
  79.  
  80. (table vanishes-on
  81.   ((explorer crew) waters true)
  82. )
  83.  
  84. (table wrecks-on
  85.   (fleet land true)
  86. )
  87.  
  88. ;; A shipwreck is usable as a fort.
  89.  
  90. (add fleet wrecked-type fort)
  91.  
  92. (table unit-capacity-x
  93.   (fleet (explorer crew) (3 3))
  94.   (fort (explorer crew) (3 3))
  95.   (city (explorer crew) (100 30))
  96.   (native-village (explorer crew) 1)
  97.   (native-city (explorer crew) (100 30))
  98. )
  99.  
  100. (table unit-storage-x
  101.   ((explorer crew) (food water) 2)
  102.   (fleet (food water) 20)
  103.   (fleet wood 10)
  104. )
  105.  
  106. ;;; Vision.
  107.  
  108. ;; (nothing special needed?)
  109.  
  110. ;;; Actions.
  111.  
  112. ;;; Movement.
  113.  
  114. (table mp-to-enter-terrain
  115.   ;; these are for accident prevention...
  116.   ((explorer crew) waters 99)
  117.   ;; Ship can be run aground deliberately, but only at start of turn.
  118.   (fleet land 14)
  119.   )
  120.  
  121. ;;; Construction.
  122.  
  123. (add (fleet fort) cp (8 4))
  124.  
  125. (table acp-to-create
  126.   (crew (fleet fort) 1)
  127.   )
  128.  
  129. (table cp-on-creation
  130.   (crew (fleet fort) 1)
  131.   )
  132.  
  133. (table acp-to-build
  134.   (crew (fleet fort) 1)
  135.   )
  136.  
  137. (table cp-per-build
  138.   (crew (fleet fort) 1)
  139.   )
  140.  
  141. ;;; Combat.
  142.  
  143. (table hit-chance
  144.   (explorer native-places 1)
  145.   (native-places explorer (5 20))
  146.   )
  147.  
  148. (table damage
  149.   (u* u* 1)
  150.   )
  151.  
  152. (table capture-chance
  153.   (explorer places 10)
  154.   )
  155.  
  156. ;;; Production/consumption of materials.
  157.  
  158. (table base-production
  159.   ((explorer crew) (food water) 1)
  160.   )
  161.  
  162. (table productivity
  163.   ((explorer crew) (plains forest swamp) 100)
  164.   )
  165.  
  166. (table base-consumption
  167.   ((explorer crew) (food water) 1)
  168.   )
  169.  
  170. (table hp-per-starve
  171.   ;; Going without food is bad for one's health, but not instantly fatal.
  172.   ((explorer crew) food 1.00)
  173.   ;; Water is essential, however.
  174.   ((explorer crew) water 100.00)
  175.   )
  176.  
  177. ;;; Random events.
  178.  
  179. (table accident-vanish-chance
  180.   (fleet waters (30 10))
  181.   )
  182.  
  183. ;;; Starting material for random setups.
  184.  
  185. (define country-radius-min 2)
  186.  
  187. (add (sea plains) country-terrain-min (1 3))
  188.  
  189. (add (explorer crew fleet city) start-with (1 1 1 1))
  190.  
  191. (table favored-terrain
  192.   (u* t* 0)
  193.   ((explorer crew) plains 100) 
  194.   (city plains 100)
  195.   (fleet sea 100)
  196.   ((native-village native-city) land 100)
  197.   )
  198.  
  199. (add city initial-seen-radius 6)
  200.  
  201. (table independent-density
  202.   (native-village (plains forest mountains) (100 50 20))
  203.   (native-city plains 10)
  204.   )
  205.  
  206. (include "ng-weird")
  207.  
  208. (add native-places namer "generic-names")
  209.  
  210. (table unit-initial-supply
  211.   ;; Everybody starts out with plenty of food and water.
  212.   (u* (food water) 9999)
  213.   (native-city gold 100)
  214.   )
  215.  
  216. ;;; This works as a solo game, but more can play if desired.
  217.  
  218. (set sides-min 1)
  219.  
  220. ;;; Players can give them more explorers and ships to start with.
  221.  
  222. (set advantage-min 1)
  223. (set advantage-default 1)
  224. (set advantage-max 5)
  225.  
  226. #| This only really makes sense with the actual world to play on.
  227. (set side-library '(
  228.   ((noun "Spaniard") (emblem-name "flag-spain-old")
  229.    )
  230.   ((noun "Portuguese") (emblem-name "flag-portugal")
  231.    )
  232.   ((noun "English") (emblem-name "flag-uk")
  233.    )
  234.   ((noun "French") (emblem-name "flag-france")
  235.    )
  236.   ((noun "Dutch") (emblem-name "flag-dutch")
  237.    )
  238.   ))
  239. |#
  240.  
  241. ;;; should always generate a globe-girdling area to play on.
  242.  
  243. (game-module
  244.   (notes
  245.     "might want a general operates-equipment relation so crew can move via
  246.     ships but can still leave, thus immobilizing the ships"
  247.     "explorer would have to manage crews properly"
  248.  
  249.     "crews on land can collect water/food and store on ship"
  250.  
  251.     "forts protect crew while they forage(?)"
  252.  
  253.     "high chance of attrition for crew"
  254.     "Explorer only vulnerable to combat or starvation however"
  255.  
  256.     "need to do storms somehow (stripped-down lat-based weather model?)"
  257.  
  258.   "Turn length is about a week."
  259.  ))
  260.